package com.study.ssm.awaring;

import com.study.ssm.UnitTestBase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;

/**
 * <pre>
 *     project name: SpringStudy
 *     author      : 李琼
 *     e-mail      : 1265137718@qq.com
 *     create time : 2017/9/15 下午11:41
 *     desc        : 描述--//AutoAwaringTest TODO
 *     URL         : CSDN:http://blog.csdn.net/qq_22945151
 *                   GitHub:https://github.com/a1265137718
 *     Reference   ://
 *     modifier               :
 *     modification time      :
 *     modify remarks         :
 *
 *     @version: --//TODO
 * </pre>
 */

@RunWith(BlockJUnit4ClassRunner.class)
public class AutoAwaringTest extends UnitTestBase{

    public AutoAwaringTest(){
        super("classpath:./resources/spring-autoawaring.xml");
    }

    @Test
    public void testAutoAwaringByName(){
        AutoAwaringService autoAwaringService = super.getBean("autoAwaringService");
        autoAwaringService.say("自动装配");

//        AutoAwaringDao autoAwaringDao = super.getBean("autoAwaringDao");
//        autoAwaringDao.say("test");//输出 AutoAwaringDaoTest
//        autoAwaringDao.sayString();//输出 AutoAwaringDaonull
//        autoAwaringDao.testOtherBean();//需要对BeanScope这个类进行初始化
    }
}
